/// created by hx           2020/11/5:13:40


import 'dart:convert' show json;

class Matcheds {

  List<MatchedUsers> list;

  Matcheds.fromParams({this.list});

  factory Matcheds(jsonStr) => jsonStr == null ? null : jsonStr is String ? Matcheds.fromJson(json.decode(jsonStr)) : Matcheds.fromJson(jsonStr);

  Matcheds.fromJson(jsonRes) {
    list = jsonRes == null ? null : [];

    for (var listItem in list == null ? [] : jsonRes){
      list.add(listItem == null ? null : MatchedUsers.fromJson(listItem));
    }
  }

  @override
  String toString() {
    return '{"json_list": $list}';
  }
}

class MatchedUsers {

  int muid;
  String icon;
  String nickname;

  MatchedUsers.fromParams({this.muid, this.icon, this.nickname});

  MatchedUsers.fromJson(jsonRes) {
    muid = jsonRes['muid'];
    icon = jsonRes['icon'];
    nickname = jsonRes['nickname'];
  }

  @override
  String toString() {
    return '{"muid": $muid, "icon": ${icon != null?'${json.encode(icon)}':'null'}, "nickname": ${nickname != null?'${json.encode(nickname)}':'null'}}';
  }
}